package com.example.demo.niuke;

/**
 * @Author: liull
 * @Description:
 * @Date: Created in 22:03 2020/3/24
 * @Modified By:
 */

import java.util.*;

public class Main28 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int i = sc.nextInt();
            if (i < 1) {
                System.out.println(-1);
            } else {
                System.out.println(2 * i + (i * (i - 1)) / 2 * 3);
            }
        }

    }
}